<?php
$cat_faq_info = get_cat_faq_by_link($param[1]);
$cat_name 	  = "";
$title		  = "Hướng Dẫn";
if($cat_faq_info){$cat_name=$cat_faq_info["cat_name"]; $title=$cat_faq_info["cat_name"];}

//Set Titile====================
$CONFIG['site_title'] = $title;
if(!empty($params[1])){ $CONFIG['site_title'].=" - Trang ".intval($param[2]); }
//==============================

?>
<div class="toplink"><img src="/images/iconhome.gif" /><a href="#"><b>[Trang chủ]</b></a>&raquo;<a href="#" class="pagehere">[Hỏi đáp]</a></div>
<div class="help_left">
		<div class="hd_top"><span></span></div>
		<div class="hd_bg">
			<div class="icontitle"></div>
			<div class="title_hd">
				<ul>
					<li><a href="<?php echo get_link('faq'); ?>" class="cr_hd" title="[Hướng dẫn]">[Hướng dẫn]</a> | <?php echo $cat_name; ?></li>
                                        <li class="datetime_hd">&nbsp;</li>
				</ul>
			</div>
			<div class="line_hd">
				<ul>
                <?php
					  $rs_faq = get_all_faq_page(intval($cat_faq_info["cat_id"]),intval($param[2]));
					  while($faq=$db->fetch_array($rs_faq["faq"])){
  					  
					    echo "<li>";
                        echo "<a href='".get_link('faq','detail',$faq["title_link"])."' title='".htmlentities_utf8($faq["title"])."' ><b>".$faq["title"]."</b></a><br />";
                        echo sum_str(strip_tags($faq["content"]),360);
                        echo "<h2><a href='".get_link('faq','detail',$faq["title_link"])."' title='".htmlentities_utf8($faq["title"])."' >[Xem thêm]</a><img src='".SITE_IMAGES_URL."/arrow3.gif' /></h2>";
                        echo "</li>";
                    
 					  } 
				?>
                	
				</ul>
			</div>
            
				<?php
					
					if($rs_faq["total"]>1&&!empty($params[1])){
					
						echo paging($rs_faq["page"],$rs_faq["total"],get_link_page('faq','cat',$cat_faq_info["cat_name_link"]));
					
					}
					
                ?>
			            
		</div>
        
		<div class="hd_bt"><span></span></div>
</div>